home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 199 < prev    next >
Encoding:
Text File  |  1996-08-06  |  3.0 KB  |  73 lines

  1. Newsgroups: comp.lang.c,comp.std.c
  2. Path: in2.uu.net!world!mv!usenet
  3. From: ENGR@GSSI.MV.COM (Michael Furman)
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Message-ID: <DLtABq.Fzu@mv.mv.com>
  6. Mime-Version: 1.0
  7. Organization: GSSI
  8. Date: Fri, 26 Jan 1996 23:23:49 GMT
  9. References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM> <KANZE.96Jan26164833@gabi.gabi-soft.fr>
  10. X-Newsreader: WinVN 0.93.10
  11. X-Nntp-Posting-Host: gssi.mv.com
  12.  
  13. In article <KANZE.96Jan26164833@gabi.gabi-soft.fr>, kanze@gabi.gabi-soft.fr 
  14. says...
  15. >
  16. >In article <DLoy4x.AFG@mv.mv.com> ENGR@GSSI.MV.COM (Michael Furman)
  17. >writes:
  18. >
  19. >>   Could somebody please clarify is "C" standard so strict and does not let
  20. >> use some constructions that "C++" draft stadard let? Namely:
  21. >
  22. >> 1. Integer conversion when source value can not be represented in 
  23. destination
  24. >> type. In C++ it is defined. In case of both unsigned types it completely
  25. >> defined in standard; othervise details of "how it will be converted" must
  26. >> be defined by implementation. 
  27. >
  28. >I don't see any difference in meaning in the two standards:
  29. >
  30. >C (ISO 9899, section 6.2.1.2): "When a value with integral type is
  31. >demoted to a signed integer with smaller size, or an unsigned integer is
  32. >converted to its corresponding signed integer, if the value cannot be
  33. >represented the result is implementation defined."
  34. >
  35. >C++ (Sept. 1995 draft, section 4.7): "If the destination type is signed,
  36. >the value is unchanged if it can be represented in the destination type
  37. >(and bitfield width); otherwise the value is implementation defined."
  38. >
  39. >Could you clarify where you see the difference?
  40.  
  41. No, I do not see any difference.
  42.  
  43. >
  44. >> 2. Implementation extention: additional forms of function main, like:
  45. >> 
  46. >> int main(int argc, char * * argv, char * env);
  47. >> 
  48. >> In C++ draft standard said that any implementation must allow 2 kinds if
  49. >> "main" definitions, but does not forbid extentions.
  50. >
  51. >Existing practice?  Reality?  The rule that forbids extensions in the C
  52.                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  53. My question was: is such rule exists?
  54.  
  55. >standard is completely ignored, as far as I can tell.  All of the Unix
  56. >compilers I'm familiar with, for example, allow the version you cite (or
  57. >rather a version with a char** as third parameter).
  58. >-- 
  59. >James Kanze           (+33) 88 14 49 00          email: kanze@gabi-soft.fr
  60. >GABI Software, Sarl., 8 rue des Francs Bourgeois, 67000 Strasbourg, France
  61. >Conseils, Θtudes et rΘalisations en logiciel orientΘ objet --
  62. >              -- A la recherche d'une activitΘ dans une region francophone
  63.  
  64. -- 
  65. <<<<<<<< This is a copy of post to the newsgroup >>>>>>>>
  66. ---------------------------------------------------------------
  67. Michael Furman,                       (603)893-1109
  68. Geophysical Survey Systems, Inc.  fax:(603)889-3984
  69. 13 Klein Drive - P.O. Box 97          engr@gssi.mv.com 
  70. North Salem, NH 03073-0097            71543.1334@compuserve.com
  71. ---------------------------------------------------------------
  72.  
  73.